home *** CD-ROM | disk | FTP | other *** search
- /*
- * scan.h
- *
- * Interface between main.c and scan.c modules of an Impressario
- * scanner driver.
- *
- * Copyright 1992, 1993, 1994 Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
-
- #ifndef MIN
- #define MIN(a,b) ((a) < (b) ? (a) : (b))
- #endif
-
- #ifndef MAX
- #define MAX(a,b) ((a) > (b) ? (a) : (b))
- #endif
-
- #define ilimit(val,floor,roof) MIN(roof, MAX(floor, val))
-
- typedef struct tag_scaninfo {
- int metric; /* metric for res, page size */
-
- float pagex, pagey, pagewidth, pageheight; /* page size */
-
- float minxres, maxxres, minyres, maxyres; /* resolution bounds */
- float *xres, *yres; /* resolution arrays */
- int nres; /* size of arrays */
-
- int canZoom; /* 1 if scanner can */
- /* zoom */
- SCDATATYPE *types; /* supported types */
- int ntypes; /* number of types */
-
- SCANFUNC *options; /* scanner specific */
- /* options */
- int noptions; /* number of options */
-
- void *priv; /* private member */
- SCFEEDERFLAGS feederFlags; /* feeder flags */
- } SCANINFO;
-
- typedef struct tag_scanparams {
- float xres, yres; /* resolution */
-
- float x, y, width, height; /* scan area */
- SCDATATYPE type; /* scan data type */
-
- int preview; /* 1 if this is a preview, 0 othersise */
-
- SCQUEUE *scanq, *sfreeq; /* buffer queues */
-
- int xpixels, ylines, xbytes; /* Actual size of scan data */
-
- /*
- * Function to convert a row of data from scanner specific format
- * to format recognized by Impressario scanning architecture.
- */
- void (*convert)(void *from, int fromx, void *to, int tox, int *zmap);
-
- int maxmem; /* maximum amount of memory to allocate */
- int readlines; /* Number of lines to scan at a time */
- SCANINFO *s; /* scaninfo returned from OpenScanner */
- } SCANPARAMS;
-
- SCANINFO * OpenScanner(char *dev);
- int SetupScan(SCANPARAMS *params);
- int ScanReset(SCANINFO *scan);
- void DoScan(SCANPARAMS *params);
- int SetFeederFlags(SCANINFO *scan, SCFEEDERFLAGS flags);
- int AdvanceFeeder(SCANINFO *scan);
- int FeederReady(SCANINFO *scan);
-
- void PrintID(FILE *fp);
- void FindScanners(FILE *fp);
-
- int InstallScanner(char *dev);
- int DeleteScanner(char *dev);
-
- void *GetSaveOptions(SCANINFO *scan, int *nBytes);
- int SetSaveOptions(SCANINFO *scan, void *options, int nBytes);
-
-
-
-